import { Types } from "mongoose";

export interface TimeStamp {
    createdAt: string;
    updatedAt: string;
}

export interface IDParams {
    _id: string;
}

export type PageReq<D = Record<string, unknown>> = { pageSize: number | string; page: number | string } & Partial<D>;

export interface PageObj<T = unknown> {
    total: number;
    list: T[];
}

export interface Response<T = unknown> {
    status: number;
    data: T;
    message: string;
}

export type PageResponse<T = never> = Response<PageObj<T>>;

export type ReferType = string[] | Types.ObjectId[];
